package com.example.demo.controller;

import com.example.demo.entity.User;
import com.example.demo.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/userLogin")
public class LoginController {

    @Autowired
    LoginService loginService;


    @ResponseBody
    @RequestMapping(value = "/showLogin")
    //http://localhost:8081/userLogin/showLogin
    public User showLogin(){
        return loginService.query();
    }
}
